<%@ page import="com.goal98.team.Constants" %>
<head>
  <meta name="layout" content="mobile"/>
  <title><g:message code="player.account" default="Player Account"/></title>    
</head>

<body>

    <div class=highlight><g:message code="player.account" default="Player Account"/></div>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <div class="dialog">
      <table>
        <tbody>

          <tr class="prop">
            <td valign="top" class="name"><g:message code="register.id" default="Login Name"/>:</td>
            <td valign="top" class="value">${person.username?.encodeAsHTML()}</td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name"><g:message code="register.fullName" default="Full Name"/>:</td>
            <td valign="top" class="value">${person.userRealName?.encodeAsHTML()}</td>
          </tr>

        </tbody>
      </table>
    </div>

    <g:render template="/shared/account" model="[account:person.account]"/>

    <g:ifAnyGranted role="${Constants.ROLE_TEAM_ADMIN}">
      <div class="dialog">
        <g:form name="myForm" url="[action:'credit', controller:'player']">
          <table>

            <tbody>

              <tr class="prop">

                <td valign="top" class="name"><g:message code="transaction.amount" default="Amount"/>:</td>
                <td valign="top" class="value">
                  <input name="person.id" type="hidden" value="${person.id}"/>
                  <input name="id" type="hidden" value="${person.account?.id}"/>
                  <input name="description" type="hidden" value="预付费"/>
                  <input name="amount" type="text"/>
                  <input name="submit" type="submit" value="${message(code: 'button.credit', 'default': 'Submit')}"/>
                </td>

              </tr>

            </tbody>

          </table>
        </g:form>
      </div>
    </g:ifAnyGranted>
    

</body>
